package com.zmn.oms.services.interfaces.refund;

import com.zmn.oms.model.entity.refund.OrderWorkRefund;
import java.util.List;

/**
 * 类描述：工单退款记录
 *
 * @author lujia
 * @date 2018/12/18 21:07
 */
public interface OrderWorkRefundService {

    /**
     * 保存工单退款记录
     * @param orderWorkRefund
     * @return
     */
    int insertOrderWorkRefund(OrderWorkRefund orderWorkRefund);


    /**
     * 保存工单退款记录
     * @param orderId
     * @param workId
     * @param amount
     * @param amountType
     * @param type
     * @return
     */
    int insertOrderWorkRefund(Long orderId, Long workId, Integer amount, Integer amountType, Integer type);

    /**
     * 通过订单id和工单id查询退款记录
     * @param orderId
     * @param workId
     * @return
     */
    List<OrderWorkRefund> findOrderWorkRefundByOrderIdAndWorkId(Long orderId, Long workId);

	int insertOrderWorkRefund(Long orderId, Long workId, Integer amount, Integer amountType, Integer type, Integer payChannelId);

	/**
     * 修改退款
     * @param orderWorkRefund
     * @return
     */
	int updateByRefundId(OrderWorkRefund orderWorkRefund);

	/**
	 * 删除退款单
	 * @param orderId
	 * @param refundId
	 * @return
	 */
	int deleteOrderWorkRefund(Long orderId, Long refundId);
}
